import wsgiref.handlers
from compose import CreateSketch 
from compose import Sketch
from view import ViewSketch

from google.appengine.ext import webapp

class MainPage(webapp.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/html'
        self.response.out.write('''
<html>
<h2>Elephant Notes Main Page</h2>
<a href="./create">Create New Sketch</a><br>
<a href="./view">View my Sketches</a>
</html>''')


def main():
    application = webapp.WSGIApplication(
                                         [('/', MainPage),
                                          ('/create', CreateSketch),
                                          ('/view', ViewSketch)],
                                          debug=True)
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
    main()
